import Vue from 'vue'
import Router from 'vue-router'

// 引入首页组件
import learingIndex from '@/module-index/index'
import listAll from '@/module-index/list'
import learingIndexDetail from '@/module-index/detail'
import Play from '@/module-index/play'
import Pay from '@/module-index/pay'

Vue.use(Router)

export default new Router({
  routes: [
  {
    //首页组件 
    path: '/',                          // 首页
    name: 'learingIndex',
    component: learingIndex
  },
  {
      path: '/index',                   // 首页
      name: 'learingIndex1',
      component: learingIndex
    },
    {
      path: '/list/all',                 // 查看全部
      name: 'listAll',
      component: listAll
    },
    {
      path: '/detail/:classId',     // 详情页
      name: 'learingIndexDetail',
      component: learingIndexDetail
    },
    {
      path: '/pay/:classId',     // 播放页
      name: 'pay',
      component: Pay
    },
    {
      path: '/play/:classId',     // 购买页
      name: 'play',
      component: Play
    },
    {
      path: '/course',                 // 课程
      name: 'courseIndex',
      component: learingIndex
    },
    {
      path: '/list',                 // 分类
      name: 'listIndex',
      component: learingIndex
    },
  ]
})
